#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START bash-builtin-lockf
#
# depends: bash

rm -rf build/bash-builtin-lockf
mkdir -p build/bash-builtin-lockf
cd build/bash-builtin-lockf

${TARGET}-gcc -o lockf \
	-shared -fPIC -DPIC $CPPFLAGS $CFLAGS \
	-I${stage}${prefix}/include/bash4 \
	-I${stage}${prefix}/include/bash4/include \
	-I${stage}${prefix}/include/bash4/builtins \
	../../bash-builtin-lockf/lockf.c

mkdir -p "${stage}${prefix}/lib/bash"
cp -a --target-directory="${stage}${prefix}/lib/bash" lockf

# RECIPE END bash-builtin-lockf
